package com.wanxi.web.service.shop.impl;

import com.wanxi.enterprise.api.feign.EnterpriseFeignCilent;
import com.wanxi.enterprise.api.query.ShopQuery;
import com.wanxi.enterprise.api.result.CommonResult;
import com.wanxi.enterprise.api.vo.ShopAddInVo;
import com.wanxi.enterprise.api.vo.ShopFindAllOutVo;
import com.wanxi.enterprise.api.vo.ShopUpdateInVo;
import com.wanxi.web.service.shop.ShopWebService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * ClassName: ShopWebServiceImpl
 * Description:
 * date: 2022/1/17 9:25
 *
 * @author lxl
 * @version 1.0
 * @since JDK 1.8
 */
@Service
public class ShopWebServiceImpl implements ShopWebService {

    @Resource
    private EnterpriseFeignCilent enterpriseFeignCilent;

    @Override
    public CommonResult<List<ShopFindAllOutVo>> findShopAll(ShopQuery shopQuery) {
        return enterpriseFeignCilent.findShopAll(shopQuery);
    }

    @Override
    public CommonResult findShopById(Long id) {
        return enterpriseFeignCilent.findShopById(id);
    }

    @Override
    public CommonResult addShop(ShopAddInVo shopAddInVo) {
        return enterpriseFeignCilent.addShop(shopAddInVo);
    }

    @Override
    public CommonResult updateShopById(ShopUpdateInVo shopUpdateInVo) {
        return enterpriseFeignCilent.updateShop(shopUpdateInVo);
    }

    @Override
    public CommonResult deleteShopById(Long id) {
        return enterpriseFeignCilent.deleteShopById(id);
    }
}
